const router = require('koa-router')()
const { models } = require('../model')
const ToolEdit = require('../controller/toolEdit')
const toolEditController = new ToolEdit({ model: models.Topic })

// 编辑工作流
router.post('/workflow/:operation', toolEditController.createWorkflow())
router.put('/workflow/:id', toolEditController.updateWorkflow())
router.get('/workflow/edit-records/list', toolEditController.getEditWorkflowList())
router.get('/workflow/review-records/list', toolEditController.getReviewWorkflowList())
router.get('/workflow/:id', toolEditController.getDetail())
router.put('/workflow/:id/status', toolEditController.updateWorkflowStatus())

module.exports = router
